
_echo：     文件格式 elf32-i386


Disassembly of section .text:

00000000 <main>:
#include "stat.h"
#include "user.h"

int
main(int argc, char *argv[])
{
   0:	8d 4c 24 04          	lea    0x4(%esp),%ecx
   4:	83 e4 f0             	and    $0xfffffff0,%esp
   7:	ff 71 fc             	push   -0x4(%ecx)
   a:	55                   	push   %ebp
   b:	89 e5                	mov    %esp,%ebp
   d:	57                   	push   %edi
   e:	56                   	push   %esi
   f:	53                   	push   %ebx
  10:	51                   	push   %ecx
  11:	83 ec 08             	sub    $0x8,%esp
  14:	8b 31                	mov    (%ecx),%esi
  16:	8b 79 04             	mov    0x4(%ecx),%edi
  int i;

  for(i = 1; i < argc; i++)
  19:	83 fe 01             	cmp    $0x1,%esi
  1c:	7e 47                	jle    65 <main+0x65>
  1e:	bb 01 00 00 00       	mov    $0x1,%ebx
    printf(1, "%s%s", argv[i], i+1 < argc ? " " : "\n");
  23:	83 c3 01             	add    $0x1,%ebx
  26:	8b 44 9f fc          	mov    -0x4(%edi,%ebx,4),%eax
  2a:	39 f3                	cmp    %esi,%ebx
  2c:	74 22                	je     50 <main+0x50>
  2e:	66 90                	xchg   %ax,%ax
  30:	68 fc 0a 00 00       	push   $0xafc
  35:	83 c3 01             	add    $0x1,%ebx
  38:	50                   	push   %eax
  39:	68 fe 0a 00 00       	push   $0xafe
  3e:	6a 01                	push   $0x1
  40:	e8 0b 04 00 00       	call   450 <printf>
  45:	8b 44 9f fc          	mov    -0x4(%edi,%ebx,4),%eax
  49:	83 c4 10             	add    $0x10,%esp
  4c:	39 f3                	cmp    %esi,%ebx
  4e:	75 e0                	jne    30 <main+0x30>
  50:	68 8c 0b 00 00       	push   $0xb8c
  55:	50                   	push   %eax
  56:	68 fe 0a 00 00       	push   $0xafe
  5b:	6a 01                	push   $0x1
  5d:	e8 ee 03 00 00       	call   450 <printf>
  62:	83 c4 10             	add    $0x10,%esp
  exit();
  65:	e8 59 02 00 00       	call   2c3 <exit>
  6a:	66 90                	xchg   %ax,%ax
  6c:	66 90                	xchg   %ax,%ax
  6e:	66 90                	xchg   %ax,%ax

00000070 <strcpy>:
#include "user.h"
#include "x86.h"

char*
strcpy(char *s, char *t)
{
  70:	55                   	push   %ebp
  char *os;

  os = s;
  while((*s++ = *t++) != 0)
  71:	31 c0                	xor    %eax,%eax
{
  73:	89 e5                	mov    %esp,%ebp
  75:	53                   	push   %ebx
  76:	8b 4d 08             	mov    0x8(%ebp),%ecx
  79:	8b 5d 0c             	mov    0xc(%ebp),%ebx
  7c:	8d 74 26 00          	lea    0x0(%esi,%eiz,1),%esi
  while((*s++ = *t++) != 0)
  80:	0f b6 14 03          	movzbl (%ebx,%eax,1),%edx
  84:	88 14 01             	mov    %dl,(%ecx,%eax,1)
  87:	83 c0 01             	add    $0x1,%eax
  8a:	84 d2                	test   %dl,%dl
  8c:	75 f2                	jne    80 <strcpy+0x10>
    ;
  return os;
}
  8e:	8b 5d fc             	mov    -0x4(%ebp),%ebx
  91:	89 c8                	mov    %ecx,%eax
  93:	c9                   	leave  
  94:	c3                   	ret    
  95:	8d b4 26 00 00 00 00 	lea    0x0(%esi,%eiz,1),%esi
  9c:	8d 74 26 00          	lea    0x0(%esi,%eiz,1),%esi

000000a0 <strcmp>:

int
strcmp(const char *p, const char *q)
{
  a0:	55                   	push   %ebp
  a1:	89 e5                	mov    %esp,%ebp
  a3:	53                   	push   %ebx
  a4:	8b 55 08             	mov    0x8(%ebp),%edx
  a7:	8b 4d 0c             	mov    0xc(%ebp),%ecx
  while(*p && *p == *q)
  aa:	0f b6 02             	movzbl (%edx),%eax
  ad:	84 c0                	test   %al,%al
  af:	75 17                	jne    c8 <strcmp+0x28>
  b1:	eb 3a                	jmp    ed <strcmp+0x4d>
  b3:	8d 74 26 00          	lea    0x0(%esi,%eiz,1),%esi
  b7:	90                   	nop
  b8:	0f b6 42 01          	movzbl 0x1(%edx),%eax
    p++, q++;
  bc:	83 c2 01             	add    $0x1,%edx
  bf:	8d 59 01             	lea    0x1(%ecx),%ebx
  while(*p && *p == *q)
  c2:	84 c0                	test   %al,%al
  c4:	74 1a                	je     e0 <strcmp+0x40>
    p++, q++;
  c6:	89 d9                	mov    %ebx,%ecx
  while(*p && *p == *q)
  c8:	0f b6 19             	movzbl (%ecx),%ebx
  cb:	38 c3                	cmp    %al,%bl
  cd:	74 e9                	je     b8 <strcmp+0x18>
  return (uchar)*p - (uchar)*q;
  cf:	29 d8                	sub    %ebx,%eax
}
  d1:	8b 5d fc             	mov    -0x4(%ebp),%ebx
  d4:	c9                   	leave  
  d5:	c3                   	ret    
  d6:	8d b4 26 00 00 00 00 	lea    0x0(%esi,%eiz,1),%esi
  dd:	8d 76 00             	lea    0x0(%esi),%esi
  return (uchar)*p - (uchar)*q;
  e0:	0f b6 59 01          	movzbl 0x1(%ecx),%ebx
  e4:	31 c0                	xor    %eax,%eax
  e6:	29 d8                	sub    %ebx,%eax
}
  e8:	8b 5d fc             	mov    -0x4(%ebp),%ebx
  eb:	c9                   	leave  
  ec:	c3                   	ret    
  return (uchar)*p - (uchar)*q;
  ed:	0f b6 19             	movzbl (%ecx),%ebx
  f0:	31 c0                	xor    %eax,%eax
  f2:	eb db                	jmp    cf <strcmp+0x2f>
  f4:	8d b4 26 00 00 00 00 	lea    0x0(%esi,%eiz,1),%esi
  fb:	8d 74 26 00          	lea    0x0(%esi,%eiz,1),%esi
  ff:	90                   	nop

00000100 <strlen>:

uint
strlen(char *s)
{
 100:	55                   	push   %ebp
 101:	89 e5                	mov    %esp,%ebp
 103:	8b 55 08             	mov    0x8(%ebp),%edx
  int n;

  for(n = 0; s[n]; n++)
 106:	80 3a 00             	cmpb   $0x0,(%edx)
 109:	74 15                	je     120 <strlen+0x20>
 10b:	31 c0                	xor    %eax,%eax
 10d:	8d 76 00             	lea    0x0(%esi),%esi
 110:	83 c0 01             	add    $0x1,%eax
 113:	80 3c 02 00          	cmpb   $0x0,(%edx,%eax,1)
 117:	89 c1                	mov    %eax,%ecx
 119:	75 f5                	jne    110 <strlen+0x10>
    ;
  return n;
}
 11b:	89 c8                	mov    %ecx,%eax
 11d:	5d                   	pop    %ebp
 11e:	c3                   	ret    
 11f:	90                   	nop
  for(n = 0; s[n]; n++)
 120:	31 c9                	xor    %ecx,%ecx
}
 122:	5d                   	pop    %ebp
 123:	89 c8                	mov    %ecx,%eax
 125:	c3                   	ret    
 126:	8d b4 26 00 00 00 00 	lea    0x0(%esi,%eiz,1),%esi
 12d:	8d 76 00             	lea    0x0(%esi),%esi

00000130 <memset>:

void*
memset(void *dst, int c, uint n)
{
 130:	55                   	push   %ebp
 131:	89 e5                	mov    %esp,%ebp
 133:	57                   	push   %edi
 134:	8b 55 08             	mov    0x8(%ebp),%edx
}

static inline void
stosb(void *addr, int data, int cnt)
{
  asm volatile("cld; rep stosb" :
 137:	8b 4d 10             	mov    0x10(%ebp),%ecx
 13a:	8b 45 0c             	mov    0xc(%ebp),%eax
 13d:	89 d7                	mov    %edx,%edi
 13f:	fc                   	cld    
 140:	f3 aa                	rep stos %al,%es:(%edi)
  stosb(dst, c, n);
  return dst;
}
 142:	8b 7d fc             	mov    -0x4(%ebp),%edi
 145:	89 d0                	mov    %edx,%eax
 147:	c9                   	leave  
 148:	c3                   	ret    
 149:	8d b4 26 00 00 00 00 	lea    0x0(%esi,%eiz,1),%esi

00000150 <strchr>:

char*
strchr(const char *s, char c)
{
 150:	55                   	push   %ebp
 151:	89 e5                	mov    %esp,%ebp
 153:	8b 45 08             	mov    0x8(%ebp),%eax
 156:	0f b6 4d 0c          	movzbl 0xc(%ebp),%ecx
  for(; *s; s++)
 15a:	0f b6 10             	movzbl (%eax),%edx
 15d:	84 d2                	test   %dl,%dl
 15f:	75 12                	jne    173 <strchr+0x23>
 161:	eb 1d                	jmp    180 <strchr+0x30>
 163:	8d 74 26 00          	lea    0x0(%esi,%eiz,1),%esi
 167:	90                   	nop
 168:	0f b6 50 01          	movzbl 0x1(%eax),%edx
 16c:	83 c0 01             	add    $0x1,%eax
 16f:	84 d2                	test   %dl,%dl
 171:	74 0d                	je     180 <strchr+0x30>
    if(*s == c)
 173:	38 d1                	cmp    %dl,%cl
 175:	75 f1                	jne    168 <strchr+0x18>
      return (char*)s;
  return 0;
}
 177:	5d                   	pop    %ebp
 178:	c3                   	ret    
 179:	8d b4 26 00 00 00 00 	lea    0x0(%esi,%eiz,1),%esi
  return 0;
 180:	31 c0                	xor    %eax,%eax
}
 182:	5d                   	pop    %ebp
 183:	c3                   	ret    
 184:	8d b4 26 00 00 00 00 	lea    0x0(%esi,%eiz,1),%esi
 18b:	8d 74 26 00          	lea    0x0(%esi,%eiz,1),%esi
 18f:	90                   	nop

00000190 <gets>:

char*
gets(char *buf, int max)
{
 190:	55                   	push   %ebp
 191:	89 e5                	mov    %esp,%ebp
 193:	57                   	push   %edi
 194:	56                   	push   %esi
  int i, cc;
  char c;

  for(i=0; i+1 < max; ){
    cc = read(0, &c, 1);
 195:	8d 7d e7             	lea    -0x19(%ebp),%edi
{
 198:	53                   	push   %ebx
  for(i=0; i+1 < max; ){
 199:	31 db                	xor    %ebx,%ebx
{
 19b:	83 ec 1c             	sub    $0x1c,%esp
  for(i=0; i+1 < max; ){
 19e:	eb 27                	jmp    1c7 <gets+0x37>
    cc = read(0, &c, 1);
 1a0:	83 ec 04             	sub    $0x4,%esp
 1a3:	6a 01                	push   $0x1
 1a5:	57                   	push   %edi
 1a6:	6a 00                	push   $0x0
 1a8:	e8 2e 01 00 00       	call   2db <read>
    if(cc < 1)
 1ad:	83 c4 10             	add    $0x10,%esp
 1b0:	85 c0                	test   %eax,%eax
 1b2:	7e 1d                	jle    1d1 <gets+0x41>
      break;
    buf[i++] = c;
 1b4:	0f b6 45 e7          	movzbl -0x19(%ebp),%eax
 1b8:	8b 55 08             	mov    0x8(%ebp),%edx
 1bb:	88 44 1a ff          	mov    %al,-0x1(%edx,%ebx,1)
    if(c == '\n' || c == '\r')
 1bf:	3c 0a                	cmp    $0xa,%al
 1c1:	74 1d                	je     1e0 <gets+0x50>
 1c3:	3c 0d                	cmp    $0xd,%al
 1c5:	74 19                	je     1e0 <gets+0x50>
  for(i=0; i+1 < max; ){
 1c7:	89 de                	mov    %ebx,%esi
 1c9:	83 c3 01             	add    $0x1,%ebx
 1cc:	3b 5d 0c             	cmp    0xc(%ebp),%ebx
 1cf:	7c cf                	jl     1a0 <gets+0x10>
      break;
  }
  buf[i] = '\0';
 1d1:	8b 45 08             	mov    0x8(%ebp),%eax
 1d4:	c6 04 30 00          	movb   $0x0,(%eax,%esi,1)
  return buf;
}
 1d8:	8d 65 f4             	lea    -0xc(%ebp),%esp
 1db:	5b                   	pop    %ebx
 1dc:	5e                   	pop    %esi
 1dd:	5f                   	pop    %edi
 1de:	5d                   	pop    %ebp
 1df:	c3                   	ret    
  buf[i] = '\0';
 1e0:	8b 45 08             	mov    0x8(%ebp),%eax
 1e3:	89 de                	mov    %ebx,%esi
 1e5:	c6 04 30 00          	movb   $0x0,(%eax,%esi,1)
}
 1e9:	8d 65 f4             	lea    -0xc(%ebp),%esp
 1ec:	5b                   	pop    %ebx
 1ed:	5e                   	pop    %esi
 1ee:	5f                   	pop    %edi
 1ef:	5d                   	pop    %ebp
 1f0:	c3                   	ret    
 1f1:	8d b4 26 00 00 00 00 	lea    0x0(%esi,%eiz,1),%esi
 1f8:	8d b4 26 00 00 00 00 	lea    0x0(%esi,%eiz,1),%esi
 1ff:	90                   	nop

00000200 <stat>:

int
stat(char *n, struct stat *st)
{
 200:	55                   	push   %ebp
 201:	89 e5                	mov    %esp,%ebp
 203:	56                   	push   %esi
 204:	53                   	push   %ebx
  int fd;
  int r;

  fd = open(n, O_RDONLY);
 205:	83 ec 08             	sub    $0x8,%esp
 208:	6a 00                	push   $0x0
 20a:	ff 75 08             	push   0x8(%ebp)
 20d:	e8 f1 00 00 00       	call   303 <open>
  if(fd < 0)
 212:	83 c4 10             	add    $0x10,%esp
 215:	85 c0                	test   %eax,%eax
 217:	78 27                	js     240 <stat+0x40>
    return -1;
  r = fstat(fd, st);
 219:	83 ec 08             	sub    $0x8,%esp
 21c:	ff 75 0c             	push   0xc(%ebp)
 21f:	89 c3                	mov    %eax,%ebx
 221:	50                   	push   %eax
 222:	e8 f4 00 00 00       	call   31b <fstat>
  close(fd);
 227:	89 1c 24             	mov    %ebx,(%esp)
  r = fstat(fd, st);
 22a:	89 c6                	mov    %eax,%esi
  close(fd);
 22c:	e8 ba 00 00 00       	call   2eb <close>
  return r;
 231:	83 c4 10             	add    $0x10,%esp
}
 234:	8d 65 f8             	lea    -0x8(%ebp),%esp
 237:	89 f0                	mov    %esi,%eax
 239:	5b                   	pop    %ebx
 23a:	5e                   	pop    %esi
 23b:	5d                   	pop    %ebp
 23c:	c3                   	ret    
 23d:	8d 76 00             	lea    0x0(%esi),%esi
    return -1;
 240:	be ff ff ff ff       	mov    $0xffffffff,%esi
 245:	eb ed                	jmp    234 <stat+0x34>
 247:	8d b4 26 00 00 00 00 	lea    0x0(%esi,%eiz,1),%esi
 24e:	66 90                	xchg   %ax,%ax

00000250 <atoi>:

int
atoi(const char *s)
{
 250:	55                   	push   %ebp
 251:	89 e5                	mov    %esp,%ebp
 253:	53                   	push   %ebx
 254:	8b 55 08             	mov    0x8(%ebp),%edx
  int n;

  n = 0;
  while('0' <= *s && *s <= '9')
 257:	0f be 02             	movsbl (%edx),%eax
 25a:	8d 48 d0             	lea    -0x30(%eax),%ecx
 25d:	80 f9 09             	cmp    $0x9,%cl
  n = 0;
 260:	b9 00 00 00 00       	mov    $0x0,%ecx
  while('0' <= *s && *s <= '9')
 265:	77 1e                	ja     285 <atoi+0x35>
 267:	8d b4 26 00 00 00 00 	lea    0x0(%esi,%eiz,1),%esi
 26e:	66 90                	xchg   %ax,%ax
    n = n*10 + *s++ - '0';
 270:	83 c2 01             	add    $0x1,%edx
 273:	8d 0c 89             	lea    (%ecx,%ecx,4),%ecx
 276:	8d 4c 48 d0          	lea    -0x30(%eax,%ecx,2),%ecx
  while('0' <= *s && *s <= '9')
 27a:	0f be 02             	movsbl (%edx),%eax
 27d:	8d 58 d0             	lea    -0x30(%eax),%ebx
 280:	80 fb 09             	cmp    $0x9,%bl
 283:	76 eb                	jbe    270 <atoi+0x20>
  return n;
}
 285:	8b 5d fc             	mov    -0x4(%ebp),%ebx
 288:	89 c8                	mov    %ecx,%eax
 28a:	c9                   	leave  
 28b:	c3                   	ret    
 28c:	8d 74 26 00          	lea    0x0(%esi,%eiz,1),%esi

00000290 <memmove>:

void*
memmove(void *vdst, void *vsrc, int n)
{
 290:	55                   	push   %ebp
 291:	89 e5                	mov    %esp,%ebp
 293:	57                   	push   %edi
 294:	8b 45 10             	mov    0x10(%ebp),%eax
 297:	8b 55 08             	mov    0x8(%ebp),%edx
 29a:	56                   	push   %esi
 29b:	8b 75 0c             	mov    0xc(%ebp),%esi
  char *dst, *src;

  dst = vdst;
  src = vsrc;
  while(n-- > 0)
 29e:	85 c0                	test   %eax,%eax
 2a0:	7e 13                	jle    2b5 <memmove+0x25>
 2a2:	01 d0                	add    %edx,%eax
  dst = vdst;
 2a4:	89 d7                	mov    %edx,%edi
 2a6:	8d b4 26 00 00 00 00 	lea    0x0(%esi,%eiz,1),%esi
 2ad:	8d 76 00             	lea    0x0(%esi),%esi
    *dst++ = *src++;
 2b0:	a4                   	movsb  %ds:(%esi),%es:(%edi)
  while(n-- > 0)
 2b1:	39 f8                	cmp    %edi,%eax
 2b3:	75 fb                	jne    2b0 <memmove+0x20>
  return vdst;
}
 2b5:	5e                   	pop    %esi
 2b6:	89 d0                	mov    %edx,%eax
 2b8:	5f                   	pop    %edi
 2b9:	5d                   	pop    %ebp
 2ba:	c3                   	ret    

000002bb <fork>:
  name: \
    movl $SYS_ ## name, %eax; \
    int $T_SYSCALL; \
    ret

SYSCALL(fork)
 2bb:	b8 01 00 00 00       	mov    $0x1,%eax
 2c0:	cd 40                	int    $0x40
 2c2:	c3                   	ret    

000002c3 <exit>:
SYSCALL(exit)
 2c3:	b8 02 00 00 00       	mov    $0x2,%eax
 2c8:	cd 40                	int    $0x40
 2ca:	c3                   	ret    

000002cb <wait>:
SYSCALL(wait)
 2cb:	b8 03 00 00 00       	mov    $0x3,%eax
 2d0:	cd 40                	int    $0x40
 2d2:	c3                   	ret    

000002d3 <pipe>:
SYSCALL(pipe)
 2d3:	b8 04 00 00 00       	mov    $0x4,%eax
 2d8:	cd 40                	int    $0x40
 2da:	c3                   	ret    

000002db <read>:
SYSCALL(read)
 2db:	b8 05 00 00 00       	mov    $0x5,%eax
 2e0:	cd 40                	int    $0x40
 2e2:	c3                   	ret    

000002e3 <write>:
SYSCALL(write)
 2e3:	b8 10 00 00 00       	mov    $0x10,%eax
 2e8:	cd 40                	int    $0x40
 2ea:	c3                   	ret    

000002eb <close>:
SYSCALL(close)
 2eb:	b8 15 00 00 00       	mov    $0x15,%eax
 2f0:	cd 40                	int    $0x40
 2f2:	c3                   	ret    

000002f3 <kill>:
SYSCALL(kill)
 2f3:	b8 06 00 00 00       	mov    $0x6,%eax
 2f8:	cd 40                	int    $0x40
 2fa:	c3                   	ret    

000002fb <exec>:
SYSCALL(exec)
 2fb:	b8 07 00 00 00       	mov    $0x7,%eax
 300:	cd 40                	int    $0x40
 302:	c3                   	ret    

00000303 <open>:
SYSCALL(open)
 303:	b8 0f 00 00 00       	mov    $0xf,%eax
 308:	cd 40                	int    $0x40
 30a:	c3                   	ret    

0000030b <mknod>:
SYSCALL(mknod)
 30b:	b8 11 00 00 00       	mov    $0x11,%eax
 310:	cd 40                	int    $0x40
 312:	c3                   	ret    

00000313 <unlink>:
SYSCALL(unlink)
 313:	b8 12 00 00 00       	mov    $0x12,%eax
 318:	cd 40                	int    $0x40
 31a:	c3                   	ret    

0000031b <fstat>:
SYSCALL(fstat)
 31b:	b8 08 00 00 00       	mov    $0x8,%eax
 320:	cd 40                	int    $0x40
 322:	c3                   	ret    

00000323 <link>:
SYSCALL(link)
 323:	b8 13 00 00 00       	mov    $0x13,%eax
 328:	cd 40                	int    $0x40
 32a:	c3                   	ret    

0000032b <mkdir>:
SYSCALL(mkdir)
 32b:	b8 14 00 00 00       	mov    $0x14,%eax
 330:	cd 40                	int    $0x40
 332:	c3                   	ret    

00000333 <chdir>:
SYSCALL(chdir)
 333:	b8 09 00 00 00       	mov    $0x9,%eax
 338:	cd 40                	int    $0x40
 33a:	c3                   	ret    

0000033b <dup>:
SYSCALL(dup)
 33b:	b8 0a 00 00 00       	mov    $0xa,%eax
 340:	cd 40                	int    $0x40
 342:	c3                   	ret    

00000343 <getpid>:
SYSCALL(getpid)
 343:	b8 0b 00 00 00       	mov    $0xb,%eax
 348:	cd 40                	int    $0x40
 34a:	c3                   	ret    

0000034b <sbrk>:
SYSCALL(sbrk)
 34b:	b8 0c 00 00 00       	mov    $0xc,%eax
 350:	cd 40                	int    $0x40
 352:	c3                   	ret    

00000353 <sleep>:
SYSCALL(sleep)
 353:	b8 0d 00 00 00       	mov    $0xd,%eax
 358:	cd 40                	int    $0x40
 35a:	c3                   	ret    

0000035b <uptime>:
SYSCALL(uptime)
 35b:	b8 0e 00 00 00       	mov    $0xe,%eax
 360:	cd 40                	int    $0x40
 362:	c3                   	ret    

00000363 <shutdown>:
SYSCALL(shutdown)
 363:	b8 16 00 00 00       	mov    $0x16,%eax
 368:	cd 40                	int    $0x40
 36a:	c3                   	ret    

0000036b <clone>:
SYSCALL(clone)
 36b:	b8 17 00 00 00       	mov    $0x17,%eax
 370:	cd 40                	int    $0x40
 372:	c3                   	ret    

00000373 <join>:
SYSCALL(join)
 373:	b8 18 00 00 00       	mov    $0x18,%eax
 378:	cd 40                	int    $0x40
 37a:	c3                   	ret    

0000037b <thread_exit>:
SYSCALL(thread_exit)
 37b:	b8 19 00 00 00       	mov    $0x19,%eax
 380:	cd 40                	int    $0x40
 382:	c3                   	ret    

00000383 <ucounter_get>:
SYSCALL(ucounter_get)
 383:	b8 1a 00 00 00       	mov    $0x1a,%eax
 388:	cd 40                	int    $0x40
 38a:	c3                   	ret    

0000038b <ucounter_set>:
SYSCALL(ucounter_set)
 38b:	b8 1b 00 00 00       	mov    $0x1b,%eax
 390:	cd 40                	int    $0x40
 392:	c3                   	ret    
 393:	66 90                	xchg   %ax,%ax
 395:	66 90                	xchg   %ax,%ax
 397:	66 90                	xchg   %ax,%ax
 399:	66 90                	xchg   %ax,%ax
 39b:	66 90                	xchg   %ax,%ax
 39d:	66 90                	xchg   %ax,%ax
 39f:	90                   	nop

000003a0 <printint>:
  write(fd, &c, 1);
}

static void
printint(int fd, int xx, int base, int sgn)
{
 3a0:	55                   	push   %ebp
 3a1:	89 e5                	mov    %esp,%ebp
 3a3:	57                   	push   %edi
 3a4:	56                   	push   %esi
 3a5:	53                   	push   %ebx
 3a6:	83 ec 3c             	sub    $0x3c,%esp
 3a9:	89 4d c4             	mov    %ecx,-0x3c(%ebp)
  uint x;

  neg = 0;
  if(sgn && xx < 0){
    neg = 1;
    x = -xx;
 3ac:	89 d1                	mov    %edx,%ecx
{
 3ae:	89 45 b8             	mov    %eax,-0x48(%ebp)
  if(sgn && xx < 0){
 3b1:	85 d2                	test   %edx,%edx
 3b3:	0f 89 7f 00 00 00    	jns    438 <printint+0x98>
 3b9:	f6 45 08 01          	testb  $0x1,0x8(%ebp)
 3bd:	74 79                	je     438 <printint+0x98>
    neg = 1;
 3bf:	c7 45 bc 01 00 00 00 	movl   $0x1,-0x44(%ebp)
    x = -xx;
 3c6:	f7 d9                	neg    %ecx
  } else {
    x = xx;
  }

  i = 0;
 3c8:	31 db                	xor    %ebx,%ebx
 3ca:	8d 75 d7             	lea    -0x29(%ebp),%esi
 3cd:	8d 76 00             	lea    0x0(%esi),%esi
  do{
    buf[i++] = digits[x % base];
 3d0:	89 c8                	mov    %ecx,%eax
 3d2:	31 d2                	xor    %edx,%edx
 3d4:	89 cf                	mov    %ecx,%edi
 3d6:	f7 75 c4             	divl   -0x3c(%ebp)
 3d9:	0f b6 92 64 0b 00 00 	movzbl 0xb64(%edx),%edx
 3e0:	89 45 c0             	mov    %eax,-0x40(%ebp)
 3e3:	89 d8                	mov    %ebx,%eax
 3e5:	8d 5b 01             	lea    0x1(%ebx),%ebx
  }while((x /= base) != 0);
 3e8:	8b 4d c0             	mov    -0x40(%ebp),%ecx
    buf[i++] = digits[x % base];
 3eb:	88 14 1e             	mov    %dl,(%esi,%ebx,1)
  }while((x /= base) != 0);
 3ee:	39 7d c4             	cmp    %edi,-0x3c(%ebp)
 3f1:	76 dd                	jbe    3d0 <printint+0x30>
  if(neg)
 3f3:	8b 4d bc             	mov    -0x44(%ebp),%ecx
 3f6:	85 c9                	test   %ecx,%ecx
 3f8:	74 0c                	je     406 <printint+0x66>
    buf[i++] = '-';
 3fa:	c6 44 1d d8 2d       	movb   $0x2d,-0x28(%ebp,%ebx,1)
    buf[i++] = digits[x % base];
 3ff:	89 d8                	mov    %ebx,%eax
    buf[i++] = '-';
 401:	ba 2d 00 00 00       	mov    $0x2d,%edx

  while(--i >= 0)
 406:	8b 7d b8             	mov    -0x48(%ebp),%edi
 409:	8d 5c 05 d7          	lea    -0x29(%ebp,%eax,1),%ebx
 40d:	eb 07                	jmp    416 <printint+0x76>
 40f:	90                   	nop
    putc(fd, buf[i]);
 410:	0f b6 13             	movzbl (%ebx),%edx
 413:	83 eb 01             	sub    $0x1,%ebx
  write(fd, &c, 1);
 416:	83 ec 04             	sub    $0x4,%esp
 419:	88 55 d7             	mov    %dl,-0x29(%ebp)
 41c:	6a 01                	push   $0x1
 41e:	56                   	push   %esi
 41f:	57                   	push   %edi
 420:	e8 be fe ff ff       	call   2e3 <write>
  while(--i >= 0)
 425:	83 c4 10             	add    $0x10,%esp
 428:	39 de                	cmp    %ebx,%esi
 42a:	75 e4                	jne    410 <printint+0x70>
}
 42c:	8d 65 f4             	lea    -0xc(%ebp),%esp
 42f:	5b                   	pop    %ebx
 430:	5e                   	pop    %esi
 431:	5f                   	pop    %edi
 432:	5d                   	pop    %ebp
 433:	c3                   	ret    
 434:	8d 74 26 00          	lea    0x0(%esi,%eiz,1),%esi
  neg = 0;
 438:	c7 45 bc 00 00 00 00 	movl   $0x0,-0x44(%ebp)
 43f:	eb 87                	jmp    3c8 <printint+0x28>
 441:	8d b4 26 00 00 00 00 	lea    0x0(%esi,%eiz,1),%esi
 448:	8d b4 26 00 00 00 00 	lea    0x0(%esi,%eiz,1),%esi
 44f:	90                   	nop

00000450 <printf>:

// Print to the given fd. Only understands %d, %x, %p, %s.
void
printf(int fd, char *fmt, ...)
{
 450:	55                   	push   %ebp
 451:	89 e5                	mov    %esp,%ebp
 453:	57                   	push   %edi
 454:	56                   	push   %esi
 455:	53                   	push   %ebx
 456:	83 ec 2c             	sub    $0x2c,%esp
  int c, i, state;
  uint *ap;

  state = 0;
  ap = (uint*)(void*)&fmt + 1;
  for(i = 0; fmt[i]; i++){
 459:	8b 5d 0c             	mov    0xc(%ebp),%ebx
{
 45c:	8b 75 08             	mov    0x8(%ebp),%esi
  for(i = 0; fmt[i]; i++){
 45f:	0f b6 13             	movzbl (%ebx),%edx
 462:	84 d2                	test   %dl,%dl
 464:	74 6a                	je     4d0 <printf+0x80>
  ap = (uint*)(void*)&fmt + 1;
 466:	8d 45 10             	lea    0x10(%ebp),%eax
 469:	83 c3 01             	add    $0x1,%ebx
  write(fd, &c, 1);
 46c:	8d 7d e7             	lea    -0x19(%ebp),%edi
  state = 0;
 46f:	31 c9                	xor    %ecx,%ecx
  ap = (uint*)(void*)&fmt + 1;
 471:	89 45 d0             	mov    %eax,-0x30(%ebp)
 474:	eb 36                	jmp    4ac <printf+0x5c>
 476:	8d b4 26 00 00 00 00 	lea    0x0(%esi,%eiz,1),%esi
 47d:	8d 76 00             	lea    0x0(%esi),%esi
 480:	89 4d d4             	mov    %ecx,-0x2c(%ebp)
    c = fmt[i] & 0xff;
    if(state == 0){
      if(c == '%'){
        state = '%';
 483:	b9 25 00 00 00       	mov    $0x25,%ecx
      if(c == '%'){
 488:	83 f8 25             	cmp    $0x25,%eax
 48b:	74 15                	je     4a2 <printf+0x52>
  write(fd, &c, 1);
 48d:	83 ec 04             	sub    $0x4,%esp
 490:	88 55 e7             	mov    %dl,-0x19(%ebp)
 493:	6a 01                	push   $0x1
 495:	57                   	push   %edi
 496:	56                   	push   %esi
 497:	e8 47 fe ff ff       	call   2e3 <write>
 49c:	8b 4d d4             	mov    -0x2c(%ebp),%ecx
      } else {
        putc(fd, c);
 49f:	83 c4 10             	add    $0x10,%esp
  for(i = 0; fmt[i]; i++){
 4a2:	0f b6 13             	movzbl (%ebx),%edx
 4a5:	83 c3 01             	add    $0x1,%ebx
 4a8:	84 d2                	test   %dl,%dl
 4aa:	74 24                	je     4d0 <printf+0x80>
    c = fmt[i] & 0xff;
 4ac:	0f b6 c2             	movzbl %dl,%eax
    if(state == 0){
 4af:	85 c9                	test   %ecx,%ecx
 4b1:	74 cd                	je     480 <printf+0x30>
      }
    } else if(state == '%'){
 4b3:	83 f9 25             	cmp    $0x25,%ecx
 4b6:	75 ea                	jne    4a2 <printf+0x52>
      if(c == 'd'){
 4b8:	83 f8 25             	cmp    $0x25,%eax
 4bb:	0f 84 07 01 00 00    	je     5c8 <printf+0x178>
 4c1:	83 e8 63             	sub    $0x63,%eax
 4c4:	83 f8 15             	cmp    $0x15,%eax
 4c7:	77 17                	ja     4e0 <printf+0x90>
 4c9:	ff 24 85 0c 0b 00 00 	jmp    *0xb0c(,%eax,4)
        putc(fd, c);
      }
      state = 0;
    }
  }
}
 4d0:	8d 65 f4             	lea    -0xc(%ebp),%esp
 4d3:	5b                   	pop    %ebx
 4d4:	5e                   	pop    %esi
 4d5:	5f                   	pop    %edi
 4d6:	5d                   	pop    %ebp
 4d7:	c3                   	ret    
 4d8:	8d b4 26 00 00 00 00 	lea    0x0(%esi,%eiz,1),%esi
 4df:	90                   	nop
  write(fd, &c, 1);
 4e0:	83 ec 04             	sub    $0x4,%esp
 4e3:	88 55 d4             	mov    %dl,-0x2c(%ebp)
 4e6:	6a 01                	push   $0x1
 4e8:	57                   	push   %edi
 4e9:	56                   	push   %esi
 4ea:	c6 45 e7 25          	movb   $0x25,-0x19(%ebp)
 4ee:	e8 f0 fd ff ff       	call   2e3 <write>
        putc(fd, c);
 4f3:	0f b6 55 d4          	movzbl -0x2c(%ebp),%edx
  write(fd, &c, 1);
 4f7:	83 c4 0c             	add    $0xc,%esp
 4fa:	88 55 e7             	mov    %dl,-0x19(%ebp)
 4fd:	6a 01                	push   $0x1
 4ff:	57                   	push   %edi
 500:	56                   	push   %esi
 501:	e8 dd fd ff ff       	call   2e3 <write>
        putc(fd, c);
 506:	83 c4 10             	add    $0x10,%esp
      state = 0;
 509:	31 c9                	xor    %ecx,%ecx
 50b:	eb 95                	jmp    4a2 <printf+0x52>
 50d:	8d 76 00             	lea    0x0(%esi),%esi
        printint(fd, *ap, 16, 0);
 510:	83 ec 0c             	sub    $0xc,%esp
 513:	b9 10 00 00 00       	mov    $0x10,%ecx
 518:	6a 00                	push   $0x0
 51a:	8b 45 d0             	mov    -0x30(%ebp),%eax
 51d:	8b 10                	mov    (%eax),%edx
 51f:	89 f0                	mov    %esi,%eax
 521:	e8 7a fe ff ff       	call   3a0 <printint>
        ap++;
 526:	83 45 d0 04          	addl   $0x4,-0x30(%ebp)
 52a:	83 c4 10             	add    $0x10,%esp
      state = 0;
 52d:	31 c9                	xor    %ecx,%ecx
 52f:	e9 6e ff ff ff       	jmp    4a2 <printf+0x52>
 534:	8d 74 26 00          	lea    0x0(%esi,%eiz,1),%esi
        s = (char*)*ap;
 538:	8b 45 d0             	mov    -0x30(%ebp),%eax
 53b:	8b 10                	mov    (%eax),%edx
        ap++;
 53d:	83 c0 04             	add    $0x4,%eax
 540:	89 45 d0             	mov    %eax,-0x30(%ebp)
        if(s == 0)
 543:	85 d2                	test   %edx,%edx
 545:	0f 84 8d 00 00 00    	je     5d8 <printf+0x188>
        while(*s != 0){
 54b:	0f b6 02             	movzbl (%edx),%eax
      state = 0;
 54e:	31 c9                	xor    %ecx,%ecx
        while(*s != 0){
 550:	84 c0                	test   %al,%al
 552:	0f 84 4a ff ff ff    	je     4a2 <printf+0x52>
 558:	89 5d d4             	mov    %ebx,-0x2c(%ebp)
 55b:	89 d3                	mov    %edx,%ebx
 55d:	8d 76 00             	lea    0x0(%esi),%esi
  write(fd, &c, 1);
 560:	83 ec 04             	sub    $0x4,%esp
          s++;
 563:	83 c3 01             	add    $0x1,%ebx
 566:	88 45 e7             	mov    %al,-0x19(%ebp)
  write(fd, &c, 1);
 569:	6a 01                	push   $0x1
 56b:	57                   	push   %edi
 56c:	56                   	push   %esi
 56d:	e8 71 fd ff ff       	call   2e3 <write>
        while(*s != 0){
 572:	0f b6 03             	movzbl (%ebx),%eax
 575:	83 c4 10             	add    $0x10,%esp
 578:	84 c0                	test   %al,%al
 57a:	75 e4                	jne    560 <printf+0x110>
      state = 0;
 57c:	8b 5d d4             	mov    -0x2c(%ebp),%ebx
 57f:	31 c9                	xor    %ecx,%ecx
 581:	e9 1c ff ff ff       	jmp    4a2 <printf+0x52>
 586:	8d b4 26 00 00 00 00 	lea    0x0(%esi,%eiz,1),%esi
 58d:	8d 76 00             	lea    0x0(%esi),%esi
        printint(fd, *ap, 10, 1);
 590:	83 ec 0c             	sub    $0xc,%esp
 593:	b9 0a 00 00 00       	mov    $0xa,%ecx
 598:	6a 01                	push   $0x1
 59a:	e9 7b ff ff ff       	jmp    51a <printf+0xca>
 59f:	90                   	nop
        putc(fd, *ap);
 5a0:	8b 45 d0             	mov    -0x30(%ebp),%eax
  write(fd, &c, 1);
 5a3:	83 ec 04             	sub    $0x4,%esp
        putc(fd, *ap);
 5a6:	8b 00                	mov    (%eax),%eax
  write(fd, &c, 1);
 5a8:	6a 01                	push   $0x1
 5aa:	57                   	push   %edi
 5ab:	56                   	push   %esi
        putc(fd, *ap);
 5ac:	88 45 e7             	mov    %al,-0x19(%ebp)
  write(fd, &c, 1);
 5af:	e8 2f fd ff ff       	call   2e3 <write>
        ap++;
 5b4:	83 45 d0 04          	addl   $0x4,-0x30(%ebp)
 5b8:	83 c4 10             	add    $0x10,%esp
      state = 0;
 5bb:	31 c9                	xor    %ecx,%ecx
 5bd:	e9 e0 fe ff ff       	jmp    4a2 <printf+0x52>
 5c2:	8d b6 00 00 00 00    	lea    0x0(%esi),%esi
        putc(fd, c);
 5c8:	88 55 e7             	mov    %dl,-0x19(%ebp)
  write(fd, &c, 1);
 5cb:	83 ec 04             	sub    $0x4,%esp
 5ce:	e9 2a ff ff ff       	jmp    4fd <printf+0xad>
 5d3:	8d 74 26 00          	lea    0x0(%esi,%eiz,1),%esi
 5d7:	90                   	nop
          s = "(null)";
 5d8:	ba 03 0b 00 00       	mov    $0xb03,%edx
        while(*s != 0){
 5dd:	89 5d d4             	mov    %ebx,-0x2c(%ebp)
 5e0:	b8 28 00 00 00       	mov    $0x28,%eax
 5e5:	89 d3                	mov    %edx,%ebx
 5e7:	e9 74 ff ff ff       	jmp    560 <printf+0x110>
 5ec:	66 90                	xchg   %ax,%ax
 5ee:	66 90                	xchg   %ax,%ax

000005f0 <free>:
static Header base;
static Header *freep;

void
free(void *ap)
{
 5f0:	55                   	push   %ebp
  Header *bp, *p;

  bp = (Header*)ap - 1;
  for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr)
 5f1:	a1 a0 0f 00 00       	mov    0xfa0,%eax
{
 5f6:	89 e5                	mov    %esp,%ebp
 5f8:	57                   	push   %edi
 5f9:	56                   	push   %esi
 5fa:	53                   	push   %ebx
 5fb:	8b 5d 08             	mov    0x8(%ebp),%ebx
  bp = (Header*)ap - 1;
 5fe:	8d 4b f8             	lea    -0x8(%ebx),%ecx
  for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr)
 601:	8d b4 26 00 00 00 00 	lea    0x0(%esi,%eiz,1),%esi
 608:	89 c2                	mov    %eax,%edx
 60a:	8b 00                	mov    (%eax),%eax
 60c:	39 ca                	cmp    %ecx,%edx
 60e:	73 30                	jae    640 <free+0x50>
 610:	39 c1                	cmp    %eax,%ecx
 612:	72 04                	jb     618 <free+0x28>
    if(p >= p->s.ptr && (bp > p || bp < p->s.ptr))
 614:	39 c2                	cmp    %eax,%edx
 616:	72 f0                	jb     608 <free+0x18>
      break;
  if(bp + bp->s.size == p->s.ptr){
 618:	8b 73 fc             	mov    -0x4(%ebx),%esi
 61b:	8d 3c f1             	lea    (%ecx,%esi,8),%edi
 61e:	39 f8                	cmp    %edi,%eax
 620:	74 30                	je     652 <free+0x62>
    bp->s.size += p->s.ptr->s.size;
    bp->s.ptr = p->s.ptr->s.ptr;
 622:	89 43 f8             	mov    %eax,-0x8(%ebx)
  } else
    bp->s.ptr = p->s.ptr;
  if(p + p->s.size == bp){
 625:	8b 42 04             	mov    0x4(%edx),%eax
 628:	8d 34 c2             	lea    (%edx,%eax,8),%esi
 62b:	39 f1                	cmp    %esi,%ecx
 62d:	74 3a                	je     669 <free+0x79>
    p->s.size += bp->s.size;
    p->s.ptr = bp->s.ptr;
 62f:	89 0a                	mov    %ecx,(%edx)
  } else
    p->s.ptr = bp;
  freep = p;
}
 631:	5b                   	pop    %ebx
  freep = p;
 632:	89 15 a0 0f 00 00    	mov    %edx,0xfa0
}
 638:	5e                   	pop    %esi
 639:	5f                   	pop    %edi
 63a:	5d                   	pop    %ebp
 63b:	c3                   	ret    
 63c:	8d 74 26 00          	lea    0x0(%esi,%eiz,1),%esi
    if(p >= p->s.ptr && (bp > p || bp < p->s.ptr))
 640:	39 c2                	cmp    %eax,%edx
 642:	72 c4                	jb     608 <free+0x18>
 644:	39 c1                	cmp    %eax,%ecx
 646:	73 c0                	jae    608 <free+0x18>
  if(bp + bp->s.size == p->s.ptr){
 648:	8b 73 fc             	mov    -0x4(%ebx),%esi
 64b:	8d 3c f1             	lea    (%ecx,%esi,8),%edi
 64e:	39 f8                	cmp    %edi,%eax
 650:	75 d0                	jne    622 <free+0x32>
    bp->s.size += p->s.ptr->s.size;
 652:	03 70 04             	add    0x4(%eax),%esi
 655:	89 73 fc             	mov    %esi,-0x4(%ebx)
    bp->s.ptr = p->s.ptr->s.ptr;
 658:	8b 02                	mov    (%edx),%eax
 65a:	8b 00                	mov    (%eax),%eax
 65c:	89 43 f8             	mov    %eax,-0x8(%ebx)
  if(p + p->s.size == bp){
 65f:	8b 42 04             	mov    0x4(%edx),%eax
 662:	8d 34 c2             	lea    (%edx,%eax,8),%esi
 665:	39 f1                	cmp    %esi,%ecx
 667:	75 c6                	jne    62f <free+0x3f>
    p->s.size += bp->s.size;
 669:	03 43 fc             	add    -0x4(%ebx),%eax
  freep = p;
 66c:	89 15 a0 0f 00 00    	mov    %edx,0xfa0
    p->s.size += bp->s.size;
 672:	89 42 04             	mov    %eax,0x4(%edx)
    p->s.ptr = bp->s.ptr;
 675:	8b 4b f8             	mov    -0x8(%ebx),%ecx
 678:	89 0a                	mov    %ecx,(%edx)
}
 67a:	5b                   	pop    %ebx
 67b:	5e                   	pop    %esi
 67c:	5f                   	pop    %edi
 67d:	5d                   	pop    %ebp
 67e:	c3                   	ret    
 67f:	90                   	nop

00000680 <malloc>:
  return freep;
}

void*
malloc(uint nbytes)
{
 680:	55                   	push   %ebp
 681:	89 e5                	mov    %esp,%ebp
 683:	57                   	push   %edi
 684:	56                   	push   %esi
 685:	53                   	push   %ebx
 686:	83 ec 1c             	sub    $0x1c,%esp
  Header *p, *prevp;
  uint nunits;

  nunits = (nbytes + sizeof(Header) - 1)/sizeof(Header) + 1;
 689:	8b 45 08             	mov    0x8(%ebp),%eax
  if((prevp = freep) == 0){
 68c:	8b 3d a0 0f 00 00    	mov    0xfa0,%edi
  nunits = (nbytes + sizeof(Header) - 1)/sizeof(Header) + 1;
 692:	8d 70 07             	lea    0x7(%eax),%esi
 695:	c1 ee 03             	shr    $0x3,%esi
 698:	83 c6 01             	add    $0x1,%esi
  if((prevp = freep) == 0){
 69b:	85 ff                	test   %edi,%edi
 69d:	0f 84 9d 00 00 00    	je     740 <malloc+0xc0>
    base.s.ptr = freep = prevp = &base;
    base.s.size = 0;
  }
  for(p = prevp->s.ptr; ; prevp = p, p = p->s.ptr){
 6a3:	8b 17                	mov    (%edi),%edx
    if(p->s.size >= nunits){
 6a5:	8b 4a 04             	mov    0x4(%edx),%ecx
 6a8:	39 f1                	cmp    %esi,%ecx
 6aa:	73 6a                	jae    716 <malloc+0x96>
 6ac:	bb 00 10 00 00       	mov    $0x1000,%ebx
 6b1:	39 de                	cmp    %ebx,%esi
 6b3:	0f 43 de             	cmovae %esi,%ebx
  p = sbrk(nu * sizeof(Header));
 6b6:	8d 04 dd 00 00 00 00 	lea    0x0(,%ebx,8),%eax
 6bd:	89 45 e4             	mov    %eax,-0x1c(%ebp)
 6c0:	eb 17                	jmp    6d9 <malloc+0x59>
 6c2:	8d b6 00 00 00 00    	lea    0x0(%esi),%esi
  for(p = prevp->s.ptr; ; prevp = p, p = p->s.ptr){
 6c8:	8b 02                	mov    (%edx),%eax
    if(p->s.size >= nunits){
 6ca:	8b 48 04             	mov    0x4(%eax),%ecx
 6cd:	39 f1                	cmp    %esi,%ecx
 6cf:	73 4f                	jae    720 <malloc+0xa0>
        p->s.size = nunits;
      }
      freep = prevp;
      return (void*)(p + 1);
    }
    if(p == freep)
 6d1:	8b 3d a0 0f 00 00    	mov    0xfa0,%edi
 6d7:	89 c2                	mov    %eax,%edx
 6d9:	39 d7                	cmp    %edx,%edi
 6db:	75 eb                	jne    6c8 <malloc+0x48>
  p = sbrk(nu * sizeof(Header));
 6dd:	83 ec 0c             	sub    $0xc,%esp
 6e0:	ff 75 e4             	push   -0x1c(%ebp)
 6e3:	e8 63 fc ff ff       	call   34b <sbrk>
  if(p == (char*)-1)
 6e8:	83 c4 10             	add    $0x10,%esp
 6eb:	83 f8 ff             	cmp    $0xffffffff,%eax
 6ee:	74 1c                	je     70c <malloc+0x8c>
  hp->s.size = nu;
 6f0:	89 58 04             	mov    %ebx,0x4(%eax)
  free((void*)(hp + 1));
 6f3:	83 ec 0c             	sub    $0xc,%esp
 6f6:	83 c0 08             	add    $0x8,%eax
 6f9:	50                   	push   %eax
 6fa:	e8 f1 fe ff ff       	call   5f0 <free>
  return freep;
 6ff:	8b 15 a0 0f 00 00    	mov    0xfa0,%edx
      if((p = morecore(nunits)) == 0)
 705:	83 c4 10             	add    $0x10,%esp
 708:	85 d2                	test   %edx,%edx
 70a:	75 bc                	jne    6c8 <malloc+0x48>
        return 0;
  }
}
 70c:	8d 65 f4             	lea    -0xc(%ebp),%esp
        return 0;
 70f:	31 c0                	xor    %eax,%eax
}
 711:	5b                   	pop    %ebx
 712:	5e                   	pop    %esi
 713:	5f                   	pop    %edi
 714:	5d                   	pop    %ebp
 715:	c3                   	ret    
    if(p->s.size >= nunits){
 716:	89 d0                	mov    %edx,%eax
 718:	89 fa                	mov    %edi,%edx
 71a:	8d b6 00 00 00 00    	lea    0x0(%esi),%esi
      if(p->s.size == nunits)
 720:	39 ce                	cmp    %ecx,%esi
 722:	74 4c                	je     770 <malloc+0xf0>
        p->s.size -= nunits;
 724:	29 f1                	sub    %esi,%ecx
 726:	89 48 04             	mov    %ecx,0x4(%eax)
        p += p->s.size;
 729:	8d 04 c8             	lea    (%eax,%ecx,8),%eax
        p->s.size = nunits;
 72c:	89 70 04             	mov    %esi,0x4(%eax)
      freep = prevp;
 72f:	89 15 a0 0f 00 00    	mov    %edx,0xfa0
}
 735:	8d 65 f4             	lea    -0xc(%ebp),%esp
      return (void*)(p + 1);
 738:	83 c0 08             	add    $0x8,%eax
}
 73b:	5b                   	pop    %ebx
 73c:	5e                   	pop    %esi
 73d:	5f                   	pop    %edi
 73e:	5d                   	pop    %ebp
 73f:	c3                   	ret    
    base.s.ptr = freep = prevp = &base;
 740:	c7 05 a0 0f 00 00 a4 	movl   $0xfa4,0xfa0
 747:	0f 00 00 
    base.s.size = 0;
 74a:	bf a4 0f 00 00       	mov    $0xfa4,%edi
    base.s.ptr = freep = prevp = &base;
 74f:	c7 05 a4 0f 00 00 a4 	movl   $0xfa4,0xfa4
 756:	0f 00 00 
  for(p = prevp->s.ptr; ; prevp = p, p = p->s.ptr){
 759:	89 fa                	mov    %edi,%edx
    base.s.size = 0;
 75b:	c7 05 a8 0f 00 00 00 	movl   $0x0,0xfa8
 762:	00 00 00 
    if(p->s.size >= nunits){
 765:	e9 42 ff ff ff       	jmp    6ac <malloc+0x2c>
 76a:	8d b6 00 00 00 00    	lea    0x0(%esi),%esi
        prevp->s.ptr = p->s.ptr;
 770:	8b 08                	mov    (%eax),%ecx
 772:	89 0a                	mov    %ecx,(%edx)
 774:	eb b9                	jmp    72f <malloc+0xaf>
 776:	66 90                	xchg   %ax,%ax
 778:	66 90                	xchg   %ax,%ax
 77a:	66 90                	xchg   %ax,%ax
 77c:	66 90                	xchg   %ax,%ax
 77e:	66 90                	xchg   %ax,%ax

00000780 <xthread_create>:
extern void join(int tid,void **ret_p,void **stack);
extern void thread_exit(void *ret);


int xthread_create(int * tid, void * (* start_routine)(void *), void * arg)
{
 780:	55                   	push   %ebp
 781:	89 e5                	mov    %esp,%ebp
 783:	83 ec 14             	sub    $0x14,%esp
    // example implementation
    
    void * stack=malloc(4096);
 786:	68 00 10 00 00       	push   $0x1000
 78b:	e8 f0 fe ff ff       	call   680 <malloc>
   if(DEBUG) printf(1,"obtain stack addr %x and calling clone with input stack parameter %x\n",stack,stack+4096);
    
    int pid=clone(start_routine,stack+4096,arg);
 790:	83 c4 0c             	add    $0xc,%esp
 793:	ff 75 10             	push   0x10(%ebp)
 796:	05 00 10 00 00       	add    $0x1000,%eax
 79b:	50                   	push   %eax
 79c:	ff 75 0c             	push   0xc(%ebp)
 79f:	e8 c7 fb ff ff       	call   36b <clone>

    if(pid<0)
 7a4:	83 c4 10             	add    $0x10,%esp
 7a7:	ba ff ff ff ff       	mov    $0xffffffff,%edx
 7ac:	85 c0                	test   %eax,%eax
 7ae:	78 0a                	js     7ba <xthread_create+0x3a>
	    return -1;
    else{
	    *tid=pid;
 7b0:	8b 55 08             	mov    0x8(%ebp),%edx
 7b3:	89 02                	mov    %eax,(%edx)
	    return 1;
 7b5:	ba 01 00 00 00       	mov    $0x1,%edx
    }
}
 7ba:	c9                   	leave  
 7bb:	89 d0                	mov    %edx,%eax
 7bd:	c3                   	ret    
 7be:	66 90                	xchg   %ax,%ax

000007c0 <xthread_exit>:


void xthread_exit(void * ret_val_p)
{
    // example implementation
  thread_exit(ret_val_p);
 7c0:	e9 b6 fb ff ff       	jmp    37b <thread_exit>
 7c5:	8d b4 26 00 00 00 00 	lea    0x0(%esi,%eiz,1),%esi
 7cc:	8d 74 26 00          	lea    0x0(%esi,%eiz,1),%esi

000007d0 <xthread_join>:
    
}


void xthread_join(int tid, void ** retval)
{
 7d0:	55                   	push   %ebp
 7d1:	89 e5                	mov    %esp,%ebp
 7d3:	83 ec 1c             	sub    $0x1c,%esp
    // example implementation 
    //
    int stack;
 if(DEBUG)  printf(1,"calling join with tid=%d retval=%x stack addr %x\n",tid,retval,&stack);
    join(tid,retval,(void **)&stack);
 7d6:	8d 45 f4             	lea    -0xc(%ebp),%eax
 7d9:	50                   	push   %eax
 7da:	ff 75 0c             	push   0xc(%ebp)
 7dd:	ff 75 08             	push   0x8(%ebp)
 7e0:	e8 8e fb ff ff       	call   373 <join>
    free(((void*)stack)-4096);
 7e5:	8b 45 f4             	mov    -0xc(%ebp),%eax
 7e8:	2d 00 10 00 00       	sub    $0x1000,%eax
 7ed:	89 04 24             	mov    %eax,(%esp)
 7f0:	e8 fb fd ff ff       	call   5f0 <free>
}
 7f5:	83 c4 10             	add    $0x10,%esp
 7f8:	c9                   	leave  
 7f9:	c3                   	ret    
 7fa:	66 90                	xchg   %ax,%ax
 7fc:	66 90                	xchg   %ax,%ax
 7fe:	66 90                	xchg   %ax,%ax

00000800 <init_thread_context>:
int global_thread_id=1;//reserve 0 for the main thread
struct uthread *current_thread=0;

static int first_call_to_create=1;

void init_thread_context(struct uthread *t, void (*func)(void)){
 800:	55                   	push   %ebp
 801:	89 e5                	mov    %esp,%ebp
 803:	8b 45 08             	mov    0x8(%ebp),%eax

    // set up the value of t->context, t->context->eip
    char *stack_top=t->stack+STACK_SIZE;
    stack_top-=sizeof(struct context);
    t->context=(struct context *)stack_top;
    t->context->edi=0;
 806:	c7 80 ec 00 00 00 00 	movl   $0x0,0xec(%eax)
 80d:	00 00 00 
    stack_top-=sizeof(struct context);
 810:	8d 90 ec 00 00 00    	lea    0xec(%eax),%edx
    t->context=(struct context *)stack_top;
 816:	89 90 00 01 00 00    	mov    %edx,0x100(%eax)
    t->context->esi=0;
    t->context->ebx=0;
    t->context->ebp=(uint)stack_top;
 81c:	89 90 f8 00 00 00    	mov    %edx,0xf8(%eax)

    // Set the instruction pointer to the function to be executed
    //add your code here
    // why eip 在初始化线程时，eip 必须指向线程的入口函数（func），这样当线程首次运行时，CPU 就知道从哪里开始执行代码。
    t->context->eip=(uint)func;
 822:	8b 55 0c             	mov    0xc(%ebp),%edx
    t->context->esi=0;
 825:	c7 80 f0 00 00 00 00 	movl   $0x0,0xf0(%eax)
 82c:	00 00 00 
    t->context->ebx=0;
 82f:	c7 80 f4 00 00 00 00 	movl   $0x0,0xf4(%eax)
 836:	00 00 00 
    t->context->eip=(uint)func;
 839:	89 90 fc 00 00 00    	mov    %edx,0xfc(%eax)

}
 83f:	5d                   	pop    %ebp
 840:	c3                   	ret    
 841:	8d b4 26 00 00 00 00 	lea    0x0(%esi,%eiz,1),%esi
 848:	8d b4 26 00 00 00 00 	lea    0x0(%esi,%eiz,1),%esi
 84f:	90                   	nop

00000850 <uthread_init>:

void uthread_init(){//initialize the thread table, and set the context of the calling thread
//    printf(1,"entering uthread_init\n");
	for(int i=0;i<MAX_THREADS;i++){
 850:	b8 e4 10 00 00       	mov    $0x10e4,%eax
 855:	8d 76 00             	lea    0x0(%esi),%esi
		uthread_table[i].state=UNUSED;
 858:	c7 00 02 00 00 00    	movl   $0x2,(%eax)
	for(int i=0;i<MAX_THREADS;i++){
 85e:	05 0c 01 00 00       	add    $0x10c,%eax
 863:	3d 5c 1b 00 00       	cmp    $0x1b5c,%eax
 868:	75 ee                	jne    858 <uthread_init+0x8>
	}
    current_thread=&uthread_table[0];
 86a:	c7 05 c0 0f 00 00 e0 	movl   $0xfe0,0xfc0
 871:	0f 00 00 

    //the main thread is set to running, and will not be changed to RUNNABLE ever, so it will not be scheduled
    current_thread->state=RUNNING;    
 874:	c7 05 e4 10 00 00 00 	movl   $0x0,0x10e4
 87b:	00 00 00 
    t->context=(struct context *)stack_top;
 87e:	c7 05 e0 10 00 00 cc 	movl   $0x10cc,0x10e0
 885:	10 00 00 
    t->context->edi=0;
 888:	c7 05 cc 10 00 00 00 	movl   $0x0,0x10cc
 88f:	00 00 00 
    t->context->esi=0;
 892:	c7 05 d0 10 00 00 00 	movl   $0x0,0x10d0
 899:	00 00 00 
    t->context->ebx=0;
 89c:	c7 05 d4 10 00 00 00 	movl   $0x0,0x10d4
 8a3:	00 00 00 
    t->context->ebp=(uint)stack_top;
 8a6:	c7 05 d8 10 00 00 cc 	movl   $0x10cc,0x10d8
 8ad:	10 00 00 
    t->context->eip=(uint)func;
 8b0:	c7 05 dc 10 00 00 00 	movl   $0x0,0x10dc
 8b7:	00 00 00 
    init_thread_context(current_thread,0);
}
 8ba:	c3                   	ret    
 8bb:	8d 74 26 00          	lea    0x0(%esi,%eiz,1),%esi
 8bf:	90                   	nop

000008c0 <uthread_create>:

void uthread_create(void (*func)(void)){
 8c0:	55                   	push   %ebp
 8c1:	89 e5                	mov    %esp,%ebp
 8c3:	83 ec 10             	sub    $0x10,%esp
	//create a user thread; don't worry, it will not run immediately like a kernel thread
    printf(1,"entering uthread create\n");
 8c6:	68 75 0b 00 00       	push   $0xb75
 8cb:	6a 01                	push   $0x1
 8cd:	e8 7e fb ff ff       	call   450 <printf>
	
     if(first_call_to_create){
 8d2:	a1 98 0f 00 00       	mov    0xf98,%eax
	     first_call_to_create=0;
     }
    //find an unused thread struct
    struct uthread *t=0;
    for(int i=0;i<MAX_THREADS;i++){
        if(uthread_table[i].state==UNUSED){
 8d7:	8b 15 e4 10 00 00    	mov    0x10e4,%edx
     if(first_call_to_create){
 8dd:	83 c4 10             	add    $0x10,%esp
 8e0:	85 c0                	test   %eax,%eax
 8e2:	0f 85 a0 00 00 00    	jne    988 <uthread_create+0xc8>
    for(int i=0;i<MAX_THREADS;i++){
 8e8:	31 c0                	xor    %eax,%eax
 8ea:	eb 10                	jmp    8fc <uthread_create+0x3c>
 8ec:	8d 74 26 00          	lea    0x0(%esi,%eiz,1),%esi
        if(uthread_table[i].state==UNUSED){
 8f0:	69 d0 0c 01 00 00    	imul   $0x10c,%eax,%edx
 8f6:	8b 92 e4 10 00 00    	mov    0x10e4(%edx),%edx
 8fc:	83 fa 02             	cmp    $0x2,%edx
 8ff:	74 1f                	je     920 <uthread_create+0x60>
    for(int i=0;i<MAX_THREADS;i++){
 901:	83 c0 01             	add    $0x1,%eax
 904:	83 f8 0a             	cmp    $0xa,%eax
 907:	75 e7                	jne    8f0 <uthread_create+0x30>
            t=&uthread_table[i];
            break;
        }
    }
    if(t==0){
        printf(1,"No available thread structure\n");
 909:	83 ec 08             	sub    $0x8,%esp
 90c:	68 90 0b 00 00       	push   $0xb90
 911:	6a 01                	push   $0x1
 913:	e8 38 fb ff ff       	call   450 <printf>
        return;
 918:	83 c4 10             	add    $0x10,%esp
    // Set the thread's uid to global_thread_id, and increment global_thread_id
    t->uid = global_thread_id;
    global_thread_id++;


}
 91b:	c9                   	leave  
 91c:	c3                   	ret    
 91d:	8d 76 00             	lea    0x0(%esi),%esi
            t=&uthread_table[i];
 920:	69 c0 0c 01 00 00    	imul   $0x10c,%eax,%eax
 926:	8d 90 e0 0f 00 00    	lea    0xfe0(%eax),%edx
    stack_top-=sizeof(struct context);
 92c:	05 cc 10 00 00       	add    $0x10cc,%eax
    t->context=(struct context *)stack_top;
 931:	89 82 00 01 00 00    	mov    %eax,0x100(%edx)
    t->context->ebp=(uint)stack_top;
 937:	89 82 f8 00 00 00    	mov    %eax,0xf8(%edx)
    t->context->eip=(uint)func;
 93d:	8b 45 08             	mov    0x8(%ebp),%eax
    t->context->edi=0;
 940:	c7 82 ec 00 00 00 00 	movl   $0x0,0xec(%edx)
 947:	00 00 00 
    t->context->eip=(uint)func;
 94a:	89 82 fc 00 00 00    	mov    %eax,0xfc(%edx)
    t->uid = global_thread_id;
 950:	a1 9c 0f 00 00       	mov    0xf9c,%eax
    t->context->esi=0;
 955:	c7 82 f0 00 00 00 00 	movl   $0x0,0xf0(%edx)
 95c:	00 00 00 
    t->uid = global_thread_id;
 95f:	89 82 08 01 00 00    	mov    %eax,0x108(%edx)
    global_thread_id++;
 965:	83 c0 01             	add    $0x1,%eax
    t->context->ebx=0;
 968:	c7 82 f4 00 00 00 00 	movl   $0x0,0xf4(%edx)
 96f:	00 00 00 
    t->state = RUNNABLE;
 972:	c7 82 04 01 00 00 01 	movl   $0x1,0x104(%edx)
 979:	00 00 00 
    global_thread_id++;
 97c:	a3 9c 0f 00 00       	mov    %eax,0xf9c
}
 981:	c9                   	leave  
 982:	c3                   	ret    
 983:	8d 74 26 00          	lea    0x0(%esi,%eiz,1),%esi
 987:	90                   	nop
 988:	b8 e4 10 00 00       	mov    $0x10e4,%eax
 98d:	8d 76 00             	lea    0x0(%esi),%esi
		uthread_table[i].state=UNUSED;
 990:	c7 00 02 00 00 00    	movl   $0x2,(%eax)
	for(int i=0;i<MAX_THREADS;i++){
 996:	05 0c 01 00 00       	add    $0x10c,%eax
 99b:	3d 5c 1b 00 00       	cmp    $0x1b5c,%eax
 9a0:	75 ee                	jne    990 <uthread_create+0xd0>
    current_thread=&uthread_table[0];
 9a2:	c7 05 c0 0f 00 00 e0 	movl   $0xfe0,0xfc0
 9a9:	0f 00 00 
	     first_call_to_create=0;
 9ac:	31 d2                	xor    %edx,%edx
    current_thread->state=RUNNING;    
 9ae:	c7 05 e4 10 00 00 00 	movl   $0x0,0x10e4
 9b5:	00 00 00 
    t->context=(struct context *)stack_top;
 9b8:	c7 05 e0 10 00 00 cc 	movl   $0x10cc,0x10e0
 9bf:	10 00 00 
    t->context->edi=0;
 9c2:	c7 05 cc 10 00 00 00 	movl   $0x0,0x10cc
 9c9:	00 00 00 
    t->context->esi=0;
 9cc:	c7 05 d0 10 00 00 00 	movl   $0x0,0x10d0
 9d3:	00 00 00 
    t->context->ebx=0;
 9d6:	c7 05 d4 10 00 00 00 	movl   $0x0,0x10d4
 9dd:	00 00 00 
    t->context->ebp=(uint)stack_top;
 9e0:	c7 05 d8 10 00 00 cc 	movl   $0x10cc,0x10d8
 9e7:	10 00 00 
    t->context->eip=(uint)func;
 9ea:	c7 05 dc 10 00 00 00 	movl   $0x0,0x10dc
 9f1:	00 00 00 
	     first_call_to_create=0;
 9f4:	c7 05 98 0f 00 00 00 	movl   $0x0,0xf98
 9fb:	00 00 00 
 9fe:	e9 e5 fe ff ff       	jmp    8e8 <uthread_create+0x28>
 a03:	8d b4 26 00 00 00 00 	lea    0x0(%esi,%eiz,1),%esi
 a0a:	8d b6 00 00 00 00    	lea    0x0(%esi),%esi

00000a10 <get_uthread_id>:

int get_uthread_id(){    
    return current_thread->uid;
 a10:	a1 c0 0f 00 00       	mov    0xfc0,%eax
 a15:	8b 80 08 01 00 00    	mov    0x108(%eax),%eax
}
 a1b:	c3                   	ret    
 a1c:	8d 74 26 00          	lea    0x0(%esi,%eiz,1),%esi

00000a20 <uthread_schedule>:



void uthread_schedule(void){
 a20:	55                   	push   %ebp
//    printf(1,"in schedule\n");
    struct uthread *t, *next_thread=0;
    for(t=uthread_table;t<uthread_table+MAX_THREADS;t++){
 a21:	b8 e0 0f 00 00       	mov    $0xfe0,%eax
void uthread_schedule(void){
 a26:	89 e5                	mov    %esp,%ebp
 a28:	83 ec 08             	sub    $0x8,%esp
        if(t->state==RUNNABLE&&t!=current_thread){
 a2b:	8b 15 c0 0f 00 00    	mov    0xfc0,%edx
 a31:	eb 11                	jmp    a44 <uthread_schedule+0x24>
 a33:	8d 74 26 00          	lea    0x0(%esi,%eiz,1),%esi
 a37:	90                   	nop
    for(t=uthread_table;t<uthread_table+MAX_THREADS;t++){
 a38:	05 0c 01 00 00       	add    $0x10c,%eax
 a3d:	3d 58 1a 00 00       	cmp    $0x1a58,%eax
 a42:	74 3c                	je     a80 <uthread_schedule+0x60>
        if(t->state==RUNNABLE&&t!=current_thread){
 a44:	83 b8 04 01 00 00 01 	cmpl   $0x1,0x104(%eax)
 a4b:	75 eb                	jne    a38 <uthread_schedule+0x18>
 a4d:	39 c2                	cmp    %eax,%edx
 a4f:	74 e7                	je     a38 <uthread_schedule+0x18>
    //your code here
    //you should call uthread_switch to change context,
    //but before that, you need to update variable current_thread to point to the next thread 
        t = current_thread;
        current_thread = next_thread;
        uthread_switch(&t->context, current_thread->context);
 a51:	83 ec 08             	sub    $0x8,%esp
 a54:	81 c2 00 01 00 00    	add    $0x100,%edx
    next_thread->state=RUNNING;
 a5a:	c7 80 04 01 00 00 00 	movl   $0x0,0x104(%eax)
 a61:	00 00 00 
        uthread_switch(&t->context, current_thread->context);
 a64:	ff b0 00 01 00 00    	push   0x100(%eax)
 a6a:	52                   	push   %edx
        current_thread = next_thread;
 a6b:	a3 c0 0f 00 00       	mov    %eax,0xfc0
        uthread_switch(&t->context, current_thread->context);
 a70:	e8 6f 00 00 00       	call   ae4 <uthread_switch>
 a75:	83 c4 10             	add    $0x10,%esp


        
    }
}
 a78:	c9                   	leave  
 a79:	c3                   	ret    
 a7a:	8d b6 00 00 00 00    	lea    0x0(%esi),%esi
    if(next_thread==0&&current_thread->state==RUNNABLE){
 a80:	83 ba 04 01 00 00 01 	cmpl   $0x1,0x104(%edx)
 a87:	74 17                	je     aa0 <uthread_schedule+0x80>
        printf(1,"No available thread, exiting the whole process\n");
 a89:	50                   	push   %eax
 a8a:	50                   	push   %eax
 a8b:	68 b0 0b 00 00       	push   $0xbb0
 a90:	6a 01                	push   $0x1
 a92:	e8 b9 f9 ff ff       	call   450 <printf>
        exit();
 a97:	e8 27 f8 ff ff       	call   2c3 <exit>
 a9c:	8d 74 26 00          	lea    0x0(%esi,%eiz,1),%esi
    next_thread->state=RUNNING;
 aa0:	c7 82 04 01 00 00 00 	movl   $0x0,0x104(%edx)
 aa7:	00 00 00 
}
 aaa:	c9                   	leave  
 aab:	c3                   	ret    
 aac:	8d 74 26 00          	lea    0x0(%esi,%eiz,1),%esi

00000ab0 <uthread_yield>:


void uthread_yield(){
    if(current_thread->uid==0){
 ab0:	a1 c0 0f 00 00       	mov    0xfc0,%eax
 ab5:	8b 90 08 01 00 00    	mov    0x108(%eax),%edx
 abb:	85 d2                	test   %edx,%edx
 abd:	74 0a                	je     ac9 <uthread_yield+0x19>
        uthread_schedule();    
        return;//will not reach here
    }
    //your code here
    //you should change the state of the current thread to RUNNABLE, and call uthread_schedule
    current_thread->state = RUNNABLE;
 abf:	c7 80 04 01 00 00 01 	movl   $0x1,0x104(%eax)
 ac6:	00 00 00 
    uthread_schedule();
 ac9:	e9 52 ff ff ff       	jmp    a20 <uthread_schedule>
 ace:	66 90                	xchg   %ax,%ax

00000ad0 <uthread_exit>:
       
}

void uthread_exit(){
    //your code here, change the state of the current thread structure to UNUSED and call uthread_schedule
    current_thread->state = UNUSED;
 ad0:	a1 c0 0f 00 00       	mov    0xfc0,%eax
 ad5:	c7 80 04 01 00 00 02 	movl   $0x2,0x104(%eax)
 adc:	00 00 00 
    uthread_schedule();
 adf:	e9 3c ff ff ff       	jmp    a20 <uthread_schedule>

00000ae4 <uthread_switch>:
# similar to/ same as swtch.S

.global uthread_switch
uthread_switch:
  movl 4(%esp), %eax
 ae4:	8b 44 24 04          	mov    0x4(%esp),%eax
  movl 8(%esp), %edx
 ae8:	8b 54 24 08          	mov    0x8(%esp),%edx

  # Save old callee-save registers
  pushl %ebp
 aec:	55                   	push   %ebp
  pushl %ebx
 aed:	53                   	push   %ebx
  pushl %esi
 aee:	56                   	push   %esi
  pushl %edi
 aef:	57                   	push   %edi

  # Switch stacks
  movl %esp, (%eax)
 af0:	89 20                	mov    %esp,(%eax)
  movl %edx, %esp
 af2:	89 d4                	mov    %edx,%esp

  # Load new callee-save registers
  popl %edi
 af4:	5f                   	pop    %edi
  popl %esi
 af5:	5e                   	pop    %esi
  popl %ebx
 af6:	5b                   	pop    %ebx
  popl %ebp
 af7:	5d                   	pop    %ebp
 af8:	c3                   	ret    
